package web

import (
	"go.uber.org/fx"
	"mallgo/core"
	"mallgo/internal/middleware/common"
)

func InitRouter(s *core.AppServer) {
	// 用户路由
	s.Engine.GET("/state", common.Auth(state))
	s.Engine.GET("/now", now)
	s.Engine.GET("/token", token)
	s.Engine.GET("/uploadFile", uploadFile)
	s.Engine.POST("/password", password)
	s.Engine.GET("/salt", salt)
	s.Engine.POST("/sha256", sha256)

}

var Module = fx.Options(
	fx.Invoke(
		InitRouter,
		initMinio,
	),
)
